<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html lang="zh-cn">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
   <link href="css/bootstrap.min.css" rel="stylesheet">
<title>初学者论坛，课程发布</title>
<!-- Bootstrap -->
<link href="css/bootstrap.css" rel="stylesheet">
 
	<script charset="utf-8" src="kindeditor/kindeditor.js"></script>
	<script charset="utf-8" src="kindeditor/lang/zh_CN.js"></script>
	<link rel="stylesheet" type="text/css" href="kindeditor/plugins/code/prettify.css" />
    <script type="text/javascript">
//初始化编辑器  K.create("#demoEditor" )  中demoEditor 为文本编辑器的id

	var editor;
	KindEditor.ready(function(K){
		editor = K.create("#demoEditor",{
			cssPath:'kindeditor/plugins/code/ke.css',
			uploadJson:'kindeditor/jsp/upload_json.jsp',
			fileManagerJson:'kindeditor/jsp/file_manager_json.jsp',
			allowFileManager:true,
			items : [
						'fontname', 'fontsize', '|', 'forecolor', 'code','hilitecolor', 'bold', 'italic', 'underline',
						'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
						'insertunorderedlist', '|', 'emoticons','source']
		});
		 prettyPrint();
	});
	

	
	function getHtmlNote(areaId){
		//获取html内容，areaId 为文本编辑的id
		editor.sync();
		var ht = document.getElementById(areaId).value;
		alert("获取内容1"+ht);
	}
//设置文本编辑器的内容
	function setHtmlNote(note){
		editor.html(note);
//editor　和初始化文本编辑器的名字相对应
	}

</script>
 
</head>
<body style="background-color: #f8f8f8;">
	 
   	  <textarea id="demoEditor" name="content" style="width:100%;height:300px">
   	 
   	  </textarea>
    <!-- Button trigger modal -->
<button type="button" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal">
  Launch demo modal
</button>

<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
        <h4 class="modal-title" id="myModalLabel">Modal title</h4>
      </div>
      <div class="modal-body">
        ...
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
        <button type="button" class="btn btn-primary">Save changes</button>
      </div>
    </div>
  </div>
</div>
     	<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
	<script src="http://cdn.bootcss.com/jquery/1.11.1/jquery.min.js"></script>
	<!-- Include all compiled plugins (below), or include individual files as needed -->
	<script src="js/bootstrap.min.js"></script>
 
 		<script type="text/javascript" src="kindeditor/plugins/code/prettify.js"></script>
		<script>
		$(function(){ prettyPrint(); });
		</script>

</body>
</html>
